#pragma once

#include <vector>
#include <string>
#include <iostream>

class talksLog
{
public:

    talksLog(int talkShow = 10)
        :_talkShow(talkShow)
    {
        ;
    }

    void addTalk(const std::string& talk)
    {
        _talks.push_back(talk);
    }

    void printTalks() const
    {
        int begin = _talks.size() > _talkShow ? _talks.size() - _talkShow : _talks.size();
        int end = _talks.size() > _talkShow ? _talks.size() : _talkShow;
        for (int i = begin; i < end; ++i)
        {
            std::cout << _talks[i] << std::endl;
        }
    }
    
    ~talksLog()
    {

    }

private:

    std::vector<std::string> _talks;
    int _talkShow;
};